/*     */ package com.qmsk.business.member.memberWx.dao;
/*     */ 
/*     */ import com.qmsk.business.sys.basic.SupportDAO;
/*     */ import com.utils.basic.MapUtils;
/*     */ import com.utils.gson.out.GsonEbRst;
/*     */ import java.sql.SQLException;
/*     */ import java.util.HashMap;
/*     */ import java.util.Map;
/*     */ import org.springframework.stereotype.Repository;
/*     */ 
/*     */ @Repository
/*     */ public class MemberWxDAO extends SupportDAO
/*     */ {
/*     */   public int getMemberCount()
/*     */     throws SQLException
/*     */   {
/*  29 */     Map params = new HashMap();
/*  30 */     return (queryForInt("selectSqlOfMemberCount", params, Integer.valueOf(1)).intValue() + 1);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfShopId(Integer shopId, Integer nPageIdx, Short nPageSize)
/*     */     throws SQLException
/*     */   {
/*  44 */     Map params = new HashMap();
/*  45 */     MapUtils.addToMap(params, "shopId", shopId);
/*  46 */     return getGsonOfParams("selectSqlOfShopId", params, nPageIdx, 
/*  47 */       nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfShopIdSys(Long shopId) throws SQLException {
/*  51 */     Map params = new HashMap();
/*  52 */     MapUtils.addToMap(params, "shopId", shopId);
/*  53 */     MapUtils.addToMap(params, "sys", Integer.valueOf(1));
/*  54 */     return getGsonOfParams("selectSqlOfShopId", params, Integer.valueOf(0), Short.valueOf((short) 1), true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfNormal(Integer shopId, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/*  59 */     Map params = new HashMap();
/*  60 */     MapUtils.addToMap(params, "shopId", shopId);
/*  61 */     return getGsonOfParams("selectSqlOfNormal", params, nPageIdx, 
/*  62 */       nPageSize, true);
/*     */   }
/*     */ 
/*     */   public GsonEbRst getGsonOfNormal(Integer shopId) throws SQLException {
/*  66 */     Map params = new HashMap();
/*  67 */     MapUtils.addToMap(params, "shopId", shopId);
/*  68 */     return getGsonOfParams("selectSqlOfNormal", params, false);
/*     */   }
/*     */ 
/*     */   public int getValidDay(Long shopId, Object levelID) throws SQLException {
/*  72 */     Map params = new HashMap();
/*  73 */     MapUtils.addToMap(params, "shopId", shopId);
/*  74 */     MapUtils.addToMap(params, "levelId", levelID);
/*  75 */     return queryForInt("selectSqlValidDay", params, Integer.valueOf(0)).intValue();
/*     */   }
/*     */ 
/*     */   public GsonEbRst getSys(Long levelId, Boolean isDefault) throws SQLException
/*     */   {
/*  80 */     Map params = new HashMap();
/*  81 */     MapUtils.addToMap(params, "levelId", levelId);
/*  82 */     if (isDefault != null) {
/*  83 */       if (isDefault.booleanValue())
/*  84 */         MapUtils.addToMap(params, "sys", Integer.valueOf(1));
/*     */       else {
/*  86 */         MapUtils.addToMap(params, "sys", Integer.valueOf(0));
/*     */       }
/*     */     }
/*  89 */     return getGsonOfParams("selectShopIdSqlOfLevelIDAndSys", params, false);
/*     */   }
/*     */ 
/*     */   public int updateSysValueOfShopId(Long shopId) throws SQLException {
/*  93 */     Map params = new HashMap();
/*  94 */     MapUtils.addToMap(params, "shopId", shopId);
/*  95 */     return update("updateSysOfShopId", params);
/*     */   }
/*     */ 
/*     */   public Double getDisCountOfLevelId(Long levelId, Long shopId) throws SQLException
/*     */   {
/* 100 */     Map params = new HashMap();
/* 101 */     MapUtils.addToMap(params, "shopId", shopId);
/* 102 */     MapUtils.addToMap(params, "levelId", levelId);
/* 103 */     return queryForDouble("getDisCountOfLevelId", params, Double.valueOf(0.0D));
/*     */   }
/*     */ 
/*     */   public GsonEbRst getWxGsonOfShopId(Integer shopId, Integer nPageIdx, Short nPageSize) throws SQLException
/*     */   {
/* 108 */     Map params = new HashMap();
/* 109 */     MapUtils.addToMap(params, "shopId", shopId);
/* 110 */     return getGsonOfParams("selectSqlWxOfShopId", params, nPageIdx, 
/* 111 */       nPageSize, true);
/*     */   }
/*     */ 
/*     */   public boolean isMemberApp(String openId, Long shopId) throws SQLException {
/* 115 */     Object[] params = { openId, shopId };
/* 116 */     return queryForBoolean("selectSqlIsMemberApp", params, Boolean.valueOf(false)).booleanValue();
/*     */   }
/*     */ 
/*     */   public Long selectSqlOfDefaultParamsShop(Long shopId, int iswxgz) throws SQLException
/*     */   {
/* 121 */     Map params = new HashMap();
/* 122 */     params.put("shopId", shopId);
/* 123 */     params.put("iswxgz", Integer.valueOf(iswxgz));
/* 124 */     return queryForLong("selectSqlOfDefaultParamsShop", params, null);
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\新建文件夹\WEB-INF\classes\
 * Qualified Name:     com.qmsk.business.member.memberWx.dao.MemberWxDAO
 * JD-Core Version:    0.5.3
 */